<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Locale"%>
<%@page import="java.util.ResourceBundle"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Collections"%>
<%@page import="java.util.Collections"%>
<%@page import="model.TagModel" %>
<%@page import="entity.Tag" %>
<%@page import="util.CacheHandle" %>
<%
	HttpSession ss = request.getSession(true);
	ResourceBundle resource = (ResourceBundle) ss.getAttribute("language"); 	
%>
<%
	List<String> listAlias = CacheHandle.getTagCache();
	List<Tag> list = new ArrayList<Tag>();			
	TagModel tagModel = new TagModel();
	for(String string: listAlias){
		Tag itag = new Tag();
		itag = tagModel.find(string);
		if(itag!=null&&itag.getCount()!=0)
		list.add(itag);	
	}
%>
<h3><%=resource.getString("recent_tag") %></h3>
<ul class="ret">
	<%for(Tag tag: list){
		%>
			<li><a class="tags" href="<%=request.getContextPath()%>/<%=resource.getString("code")%>/tag/<%=tag.getAlias() %>"><%=tag.getAlias() %></a><span class="it"> x <%=tag.getCount() %></span></li>
		<%			
	} %>		
</ul>